package cn.hrfax.stf.sdk.template;

/**
 * @author yongSen.wang
 * @date 2020/6/4 11:15
 */
public interface IAction<R, P> {

	/**
	 * 执行前的参数检查
	 *
	 * @param p
	 * @throws RuntimeException
	 */
	void checkParams(P p) throws RuntimeException;

	/**
	 * 逻辑执行
	 *
	 * @param p
	 * @return
	 * @throws RuntimeException
	 */
	R doAction(P p) throws RuntimeException;
}
